package com.sdp.irrigation.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 设备阀门信息
 * </p>
 *
 * @author zsp
 * @since 2024-12-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("irrigation_eq_valve")
public class IrrigationEqValve extends Model<IrrigationEqValve> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 设备编号
     */
    @TableField("eq_no")
    private String eqNo;

    /**
     * 阀门编号
     */
    @TableField("valve_no")
    private String valveNo;

    /**
     * 阀门名称
     */
    @TableField("valve_name")
    private String valveName;

    
    /**
     * 阀门序号
     */
    @TableField("serial_no")
    private Integer serialNo;
    
    /**
     * 阀门开关状态
     */
    @TableField("switch_status")
    private String switchStatus;
    
    
    /**
     * 备注
     */
    @TableField("valve_note")
    private String valveNote;

    /**
     * 记录生成时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 记录更新时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
